import type { RouteRecordRaw } from 'vue-router';

import { BasicLayout } from '#/layouts';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    component: BasicLayout,
    meta: {
      icon: 'lucide:settings',
      order: 9999,
      title: $t('system.title'),
    },
    name: 'system',
    path: '/system',
    children: [
      {
        name: 'user',
        path: '/system/user',
        component: () => import('#/views/system/user/index.vue'),
        meta: {
          icon: 'streamline-ultimate-color:network-user-alt',
          title: $t('system.user'),
        },
      },
      {
        name: 'role',
        path: '/system/role',
        component: () => import('#/views/system/role/index.vue'),
        meta: {
          icon: 'ix:roles-filled',
          title: $t('system.role'),
          authority: ['admin'],
        },
      },
      {
        name: 'menu',
        path: '/system/menu',
        component: () => import('#/views/system/menu/index.vue'),
        meta: {
          icon: 'streamline-ultimate-color:navigation-menu-1',
          title: $t('system.menu'),
          authority: ['admin'],
        },
      },
      {
        name: 'tenant',
        path: '/system/tenant',
        component: () => import('#/views/system/tenant/index.vue'),
        meta: {
          icon: 'flat-color-icons:organization',
          title: $t('system.tenant'),
          authority: ['admin'],
        },
      },
      {
        name: 'dept',
        path: '/system/dept',
        component: () => import('#/views/system/dept/index.vue'),
        meta: {
          icon: 'mingcute:department-line',
          title: $t('system.dept'),
          authority: ['admin'],
        },
      },
      {
        name: 'post',
        path: '/system/post',
        component: () => import('#/views/system/post/index.vue'),
        meta: {
          icon: 'fluent-emoji:construction-worker',
          title: $t('system.post'),
          authority: ['admin'],
        },
      },
    ],
  },
];

export default routes;
